#ifndef __Thread_H__
#define __Thread_H__


#include <pthread.h>

#include <functional>

namespace wd
{
using ThreadCallback = std::function<void()>;

class Thread
{
public:
    Thread(ThreadCallback && cb);
    ~Thread() {}

    void start();
    void join();

private:
    static void * start_routine(void * arg);


private:
    pthread_t _pthid;
    bool _isRunning;
    ThreadCallback _cb;
};



}//end of namespace wd


#endif

